package com.shioirikukuri.web.feign;


import com.shioirikukuri.common.web.Result;
import com.shioirikukuri.domain.PayVo;
import com.shioirikukuri.domain.RefundVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(name = "pay-service",path = "/alipay",fallback = PayFeignFallback.class)
public interface PayFeignApi {
    //http://pay-server/alipay/pay
    @RequestMapping("/pay")
    Result<String> pay(@RequestBody PayVo vo);

    //http://pay-server/alipay/rsaCheckV1
    @RequestMapping("/rsaCheckV1")
    Result<Boolean> rsaCheckV1(@RequestParam Map<String, String> params);

    //http://pay-server/alipay/refund
    @RequestMapping("/refund")
    Result<Boolean> refund(@RequestBody RefundVo vo);
}
